<template>
	  <u-tag :text="text" class="filter" :mode="val?'dark':''"  @click="click"/> 
</template>

<script>
	 export default {
	 	props: { 
	 		text: String,
			value: Boolean,
			trag: String,
	 	}, 
		data(){
			 return {
				 val:null,
			 }
		}, 
		mounted() {
			this.val = this.value
			console.log("this.val: ",this.val);
		},
	 	methods: {
	 		click() {
			   this.val = !this.val;	 
			   var obj  ={}
			   obj[this.trag] = this.val 
	 		   this.$emit('call',obj)
	 		}
	 	}
	 }
</script>

<style lang="less"> 
	.filter{
		margin:3px
	} 
</style>
